package com.graduation.mathematics.ui.fragment.parent;

import android.content.Intent;
import android.view.View;

import com.graduation.mathematics.R;
import com.graduation.mathematics.base.BaseFragment;
import com.graduation.mathematics.ui.activity.RankingActivity;
import com.graduation.mathematics.ui.activity.StatisticsExerciseActivity;
import com.graduation.mathematics.ui.fragment.student.HistoryFragment;

import butterknife.OnClick;

public class StatisticsFragment extends BaseFragment {

    public static StatisticsFragment newInstance(){
        return new StatisticsFragment();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_parent_statistics;
    }

    @Override
    protected void initEventAndData() {

    }

    @OnClick({R.id.statistics_ranking, R.id.statistics_exercise})
    public void onViewClick(View view){
        int id = view.getId();
        Intent intent = new Intent();
        if (id == R.id.statistics_ranking) {
            intent.setClass(getActivity(), RankingActivity.class);
        }
        if (id == R.id.statistics_exercise) {
            intent.setClass(getActivity(), StatisticsExerciseActivity.class);
        }
        startActivity(intent);
    }
}
